package com.allwees.bs.c.module.order.req;

import com.allwees.bs.core.modelbase.constant.ErrorMessage;
import com.allwees.core.common.constant.EPlatform;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Data
//@ApiModel(value = "下单信息")
public class OrderCreateReq {
    @NotNull(message = ErrorMessage.PARAM_NOT_NULL)
    @Range(min = 0, max = 1, message = ErrorMessage.PARAM_RANGE_ERROR)
//    @ApiModelProperty(value="订单生成方式,拼团或者单独购买,0为单独购买，1位拼团购买", required=true)
    private Integer type;

    //@NotBlank(message = ErrorMessage.PARAM_NOT_NULL)
//    @ApiModelProperty(value="收货地址ID", required=true)
    private String shippingAddressUuid;

//    @ApiModelProperty(value="付款方式，可不传")
    private Integer paymentType;

//    @ApiModelProperty(value="支付账号ID，默认为空，只有在支付方式是信用卡时才会使用")
    private Long paymentId = null;

//    @ApiModelProperty(value="订单明细项")
    private List<CartItemReq> items;

    private String inviterUserUuid;

//    @ApiModelProperty(value="用户优惠券id")
    private String userCouponUuid;

    /** 推广码 **/
    private String promoCode;

    /** 用户现金金额 **/
    @Range(min = 0, message = ErrorMessage.PARAM_RANGE_ERROR)
    private BigDecimal amtCash;

//    @ApiModelProperty(value="是否购买运费险")
    private boolean buyShippingInsurance = true;

    private EPlatform platform;

    private boolean isCheckOrder;
}
